package com.java.consumer;


import com.java.channel.MyProcessor;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.stereotype.Component;

/**
 * @ClassNameMessageListener
 * @Description
 * @Author liufei
 * @Date2021/9/6 17:02
 * @Version V1.0
 **/
@Component
@EnableBinding(MyProcessor.class)
public class MessageListener {

    @StreamListener(MyProcessor.MYINPUT)
    public void input(String message){
        System.out.println("获取到消息:"+message);
    }

}
